﻿<UserControl x:Class="TriviaViews.Views.QuestionView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="700" d:DesignWidth="700">
    <UserControl.Resources>
        <DataTemplate x:Key="AnswerDataTamplate">
            <Label Content="{Binding AnswerString}" FontSize="13" FontStyle="Normal"  Background="FloralWhite" ></Label>
        </DataTemplate>
    </UserControl.Resources>
    <Border Grid.Row="1" Grid.ColumnSpan="2" BorderThickness="2" BorderBrush="Blue">
        <Grid Grid.Row="1" Grid.ColumnSpan="2" Background="Honeydew">
            <Grid.RowDefinitions>
                <RowDefinition  Height="auto"></RowDefinition>
                <RowDefinition  Height="auto"></RowDefinition>
                <RowDefinition  Height="auto"></RowDefinition>
                <RowDefinition  Height="auto"></RowDefinition>
                <RowDefinition  Height="auto"  ></RowDefinition>
               
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"></ColumnDefinition>
                <ColumnDefinition Width="*"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <StackPanel>
                <Label Margin="10" FontWeight="DemiBold">Topics:</Label>
                <ComboBox ItemsSource="{Binding Topics}" Grid.Column="1" Margin="10" SelectedItem="{Binding SelectedTopic}"></ComboBox>
            </StackPanel>

            <StackPanel Grid.Column="1">
                <Label  Margin="10" FontWeight="DemiBold">Difficulties:</Label>
                <ComboBox ItemsSource="{Binding Difficulties}"  Margin="10" SelectedItem="{Binding SelectedDifficulty}"></ComboBox>
            </StackPanel>

            <Border Grid.Row="1" Grid.ColumnSpan="2" BorderBrush="DarkBlue" BorderThickness="3" Margin="10">
            <StackPanel Grid.Row="1" Grid.ColumnSpan="2">
                <Label>Question</Label>
                <DockPanel>
                    <Label Margin="5" FontWeight="DemiBold">Question String:</Label>
                    <TextBox Text="{Binding QuestionAdded}" Margin="5" Width="270"></TextBox>
                </DockPanel>
                <DockPanel>
                    <Label Margin="5" FontWeight="DemiBold">Add Image</Label>
                    <TextBlock>
                            <Image Source="{Binding QuestionAddedImageSource}" Name="img"></Image>
                    </TextBlock>
                    <Button Width="100" Margin="5" Command="{Binding AddPictureCommand}">Add Picture</Button>
                </DockPanel>

            </StackPanel>
            </Border>
            <Border BorderBrush="DarkBlue" BorderThickness="3" Grid.Row="2" Grid.ColumnSpan="2" Margin="10">
                <StackPanel Grid.Row="2" Grid.ColumnSpan="2">
                    <StackPanel Orientation="Horizontal">
                        <Label Margin="5" FontWeight="DemiBold">Answer1:</Label>
                        <TextBox Text="{Binding AnswerStrings[0]}" Margin="5" Width="250"></TextBox>
                        <CheckBox Margin="10" Command="{Binding CheckedCommand}"  FontWeight="DemiBold">IsRightAnswer</CheckBox>
                    </StackPanel >
                    <StackPanel Orientation="Horizontal">
                        <Label Margin="5" FontWeight="DemiBold">Answer2:</Label>
                        <TextBox Text="{Binding AnswerStrings[1]}" Margin="5" Width="250"></TextBox>
                        <CheckBox Margin="10" Command="{Binding CheckedCommand}"  FontWeight="DemiBold">IsRightAnswer</CheckBox>
                    </StackPanel>
                    <StackPanel Orientation="Horizontal">
                        <Label Margin="5" FontWeight="DemiBold">Answer3:</Label>
                        <TextBox Text="{Binding AnswerStrings[2]}" Margin="5" Width="250"></TextBox>
                        <CheckBox Margin="10" Command="{Binding CheckedCommand}"  FontWeight="DemiBold">IsRightAnswer</CheckBox>
                    </StackPanel>
                    <StackPanel Orientation="Horizontal">
                        <Label Margin="5" FontWeight="DemiBold">Answer4:</Label>
                        <TextBox Text="{Binding AnswerStrings[3]}" Margin="5" Width="250"></TextBox>
                        <CheckBox Margin="10" Command="{Binding CheckedCommand}"  FontWeight="DemiBold">IsRightAnswer</CheckBox>
                    </StackPanel>
                    <Button Width="100" Margin="10">Add Answers</Button>
                </StackPanel>
            </Border>
               
            <StackPanel Grid.Row="3" Grid.ColumnSpan="2" Orientation="Horizontal">
                <Label Margin="5" FontWeight="DemiBold">Clue:</Label>
                <TextBox Text="{Binding Clue}" Width="400" Margin="0,10"></TextBox>
            </StackPanel >
           
            <Button Command="{Binding AddQuestionDetailsCommand}" Grid.Row="4" Grid.ColumnSpan="2" Width="100" Margin="10">Add Question</Button>

        </Grid>
    </Border>
</UserControl>
